import { parse } from 'node-html-parser';

const html = `
<!--菜单收缩display-n-----菜单展开--><zjc-000003></zjc-000003>
<div id="right" style="height:100%;margin-left:165px;">
<h1>浏览器为IE</h1>
<h2>项目修改内容</h2>
<span>项目package.json文件修改：将"@feidao/widgets"的值修改为"ie"</span>
<span>项目页面文件n.ts文件修改，删除引入的<xmp><script src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script></xmp>，添加引入文件<xmp><script src="https://cdn.jsdelivr.net/npm/babel-polyfill/dist/polyfill.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/url-search-params-polyfill"></script>
<script src="https://cdn.jsdelivr.net/npm/element-closest"></script></xmp>；引入js文件修改；将之前引入页面js文件的方式修改为<xmp><script src="./js/feidao.js"></script>
<script src="./js/@page@.js"></script></xmp></span>
<h2>控件使用</h2>
<h3>控件初始化</h3>
<span>在组件的初始化事件中对控件进行初始化</span>
<xmp>引入控件：import w010 from '@feidao/widgets/fd-w000010';</xmp>
<xmp>引入控件：import w004 from '@feidao/widgets/fd-w000004';</xmp>
<xmp>await w010();
await w004();</xmp>
<span>如果不是在初始化组件时渲染控件，则需要在相对应的响应中初始化控件。</span>
<h3>控件方法调用</h3>
<span>获取控件节点，不能定义节点类型为引入的控件，定义类型为any，并获取节点的widget</span>
<xmp>const widget = (fd.data.node.querySelector('#widgetid') as any).widget;</xmp>
<span>因不能定义节点类型为控件，则必须确保调用的控件方法名称和参数是正确的。</span>
<xmp>调用方法：widget.method();</xmp>
<zj-000001></zj-000001>
</div>`;

export default parse(html);
